---
title: clsCoverageBTaskCollection
summary: API reference for clsCoverageBTaskCollection.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks.Claim
reference_type: embedded
---

# clsCoverageBTaskCollection

`clsCoverageBTaskCollection` retrieves Coverage B tasks and lazily caches a single category-code lookup per collection so repeated `CategoryDescr` reads across rows do not each hit the code table.

## Purpose
- Retrieves Coverage B tasks matching a filter, constrained to `COVB`-source rows.
- Caches one `clsTaskCategoryCodeCollection` per collection for the `COVB` source ([Resolve a Coverage B category description](../../operations/op-14-resolve-coverageb-category-description.md)).
- Translates a claim number to a claim ID filter entry via a throwaway task ([Add a claim number to a Coverage B filter](../../operations/op-15-add-claim-number-to-coverageb-filter.md)).

## Context
- Namespace: `SAIF.Business.Tasks.Claim`
- Assembly/package: `SAIF.Business.Tasks.Claim.dll` (embedded)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `FilterClaimNum` | `Public Property FilterClaimNum As String` | Echoes the claim-number filter used for retrieval. |
| `FilterCategory` | `Public Property FilterCategory As String` | Echoes the category-code filter used for retrieval. |
| `FilterStartDate` | `Public Property FilterStartDate As Date` | Echoes the start-date filter used for retrieval. |
| `FilterEndDate` | `Public Property FilterEndDate As Date` | Echoes the end-date filter used for retrieval. |
| `Add(clsCoverageBTask)` | `Public Overloads Sub Add(task As clsCoverageBTask)` | Adds a Coverage B task to the collection. |
| `Item(Integer)` | `Public Default ReadOnly Property Item(index As Integer) As clsCoverageBTask` | Returns the task at the given ordinal position. |
| `Item(guid)` | `Public Overloads ReadOnly Property Item(guid As Guid) As clsCoverageBTask` | Returns the task matching the given GUID identity. |
| `GetCategoryDescr(categoryCode)` | `Public Function GetCategoryDescr(categoryCode As String) As String` | Lazily loads and caches a `COVB` category collection, returning the matching description ([Resolve a Coverage B category description](../../operations/op-14-resolve-coverageb-category-description.md)). |
| `Shared NewTaskCollection(dpi)` | `Public Shared Function NewTaskCollection(dpi As IDataPortalInfo) As clsCoverageBTaskCollection` | Factory that creates an empty Coverage B task collection bound to the data portal. |
| `Shared GetTasks(dpi, CoverageBTaskCriteria)` | `Public Shared Function GetTasks(dpi As IDataPortalInfo, criteria As CoverageBTaskCriteria) As clsCoverageBTaskCollection` | Retrieves a filtered Coverage B task collection. |
| `Overrides NewTask()` | `Protected Overrides Function NewTask() As iTask` | Returns a new `clsCoverageBTask` instance for materialization. |
| `CoverageBTaskCriteria.AddClaimNum(claimNum)` | `Public Sub AddClaimNum(claimNum As String)` | Resolves a claim number to a claim ID and adds it to the `ClaimList` filter using a throwaway task ([Add a claim number to a Coverage B filter](../../operations/op-15-add-claim-number-to-coverageb-filter.md)). |

## Inherited public members

Members in this section are inherited from `clsTaskCollection` in `SAIF.Business.Tasks`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| `Count` | `Public ReadOnly Property Count As Integer` | Returns the number of tasks currently held in the collection.† | `SAIF.Business.Tasks` — `clsTaskCollection` |
| `Save()` | `Public Overridable Function Save() As clsTaskCollection` | Applies edits and persists each contained task through the inherited stored-procedure path.† | `SAIF.Business.Tasks` — `clsTaskCollection` |

## Behavioral notes
- The category-description cache is per-collection, so standalone (non-child) `clsCoverageBTask` instances load their own category collection instead of sharing the cache.*

## Constraints and usage notes
- `AddClaimNum` constructs a throwaway task purely to translate claim number to claim ID — a per-call database round trip whose performance impact was not measured.*

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified. Statements marked with
> † were retrieved from dependency library documentation via the Legends CLI RAG service. They
> describe inherited behavior from the indicated origin library and should be verified if the
> dependency version changes.

## Sources
- SAIF.Business.Tasks.Claim/clsCoverageBTaskCollection.vb
